3.597 \(\int \frac{(d+e x)^2 (a+c x^2)}{(f+g x)^{3/2}} \, dx\)

Optimal. Leaf size=173 \[ \frac{2 (f+g x)^{3/2} \left (a e^2 g^2+c \left (d^2 g^2-6 d e f g+6 e^2 f^2\right )\right )}{3 g^5}-\frac{2 \left (a g^2+c f^2\right ) (e f-d g)^2}{g^5 \sqrt{f+g x}}-\frac{4 \sqrt{f+g x} (e f-d g) \left (a e g^2+c f (2 e f-d g)\right )}{g^5}-\frac{4 c e (f+g x)^{5/2} (2 e f-d g)}{5 g^5}+\frac{2 c e^2 (f+g x)^{7/2}}{7 g^5} \]

[Out]

(-2*(e*f - d*g)^2*(c*f^2 + a*g^2))/(g^5*Sqrt[f + g*x]) - (4*(e*f - d*g)*(a*e*g^2 + c*f*(2*e*f - d*g))*Sqrt[f +
 g*x])/g^5 + (2*(a*e^2*g^2 + c*(6*e^2*f^2 - 6*d*e*f*g + d^2*g^2))*(f + g*x)^(3/2))/(3*g^5) - (4*c*e*(2*e*f - d
*g)*(f + g*x)^(5/2))/(5*g^5) + (2*c*e^2*(f + g*x)^(7/2))/(7*g^5)

________________________________________________________________________________________

Rubi [A]  time = 0.203525, antiderivative size = 173, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {898, 1261} \[ \frac{2 (f+g x)^{3/2} \left (a e^2 g^2+c \left (d^2 g^2-6 d e f g+6 e^2 f^2\right )\right )}{3 g^5}-\frac{2 \left (a g^2+c f^2\right ) (e f-d g)^2}{g^5 \sqrt{f+g x}}-\frac{4 \sqrt{f+g x} (e f-d g) \left (a e g^2+c f (2 e f-d g)\right )}{g^5}-\frac{4 c e (f+g x)^{5/2} (2 e f-d g)}{5 g^5}+\frac{2 c e^2 (f+g x)^{7/2}}{7 g^5} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + c*x^2))/(f + g*x)^(3/2),x]

[Out]

(-2*(e*f - d*g)^2*(c*f^2 + a*g^2))/(g^5*Sqrt[f + g*x]) - (4*(e*f - d*g)*(a*e*g^2 + c*f*(2*e*f - d*g))*Sqrt[f +
 g*x])/g^5 + (2*(a*e^2*g^2 + c*(6*e^2*f^2 - 6*d*e*f*g + d^2*g^2))*(f + g*x)^(3/2))/(3*g^5) - (4*c*e*(2*e*f - d
*g)*(f + g*x)^(5/2))/(5*g^5) + (2*c*e^2*(f + g*x)^(7/2))/(7*g^5)

Rule 898

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> With[{q = De
nominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + (g*x^q)/e)^n*((c*d^2 + a*e^2)/e^2 - (2*c
*d*x^q)/e^2 + (c*x^(2*q))/e^2)^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*
g, 0] && NeQ[c*d^2 + a*e^2, 0] && IntegersQ[n, p] && FractionQ[m]

Rule 1261

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] &&
 NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2 \left (a+c x^2\right )}{(f+g x)^{3/2}} \, dx &=\frac{2 \operatorname{Subst}\left (\int \frac{\left (\frac{-e f+d g}{g}+\frac{e x^2}{g}\right )^2 \left (\frac{c f^2+a g^2}{g^2}-\frac{2 c f x^2}{g^2}+\frac{c x^4}{g^2}\right )}{x^2} \, dx,x,\sqrt{f+g x}\right )}{g}\\ &=\frac{2 \operatorname{Subst}\left (\int \left (\frac{2 (e f-d g) \left (-a e g^2-c f (2 e f-d g)\right )}{g^4}+\frac{(-e f+d g)^2 \left (c f^2+a g^2\right )}{g^4 x^2}+\frac{\left (a e^2 g^2+c \left (6 e^2 f^2-6 d e f g+d^2 g^2\right )\right ) x^2}{g^4}-\frac{2 c e (2 e f-d g) x^4}{g^4}+\frac{c e^2 x^6}{g^4}\right ) \, dx,x,\sqrt{f+g x}\right )}{g}\\ &=-\frac{2 (e f-d g)^2 \left (c f^2+a g^2\right )}{g^5 \sqrt{f+g x}}-\frac{4 (e f-d g) \left (a e g^2+c f (2 e f-d g)\right ) \sqrt{f+g x}}{g^5}+\frac{2 \left (a e^2 g^2+c \left (6 e^2 f^2-6 d e f g+d^2 g^2\right )\right ) (f+g x)^{3/2}}{3 g^5}-\frac{4 c e (2 e f-d g) (f+g x)^{5/2}}{5 g^5}+\frac{2 c e^2 (f+g x)^{7/2}}{7 g^5}\\ \end{align*}

Mathematica [A]  time = 0.160018, size = 149, normalized size = 0.86 \[ \frac{2 \left (35 (f+g x)^2 \left (a e^2 g^2+c \left (d^2 g^2-6 d e f g+6 e^2 f^2\right )\right )-105 \left (a g^2+c f^2\right ) (e f-d g)^2-210 (f+g x) (e f-d g) \left (a e g^2+c f (2 e f-d g)\right )-42 c e (f+g x)^3 (2 e f-d g)+15 c e^2 (f+g x)^4\right )}{105 g^5 \sqrt{f+g x}} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + c*x^2))/(f + g*x)^(3/2),x]

[Out]

(2*(-105*(e*f - d*g)^2*(c*f^2 + a*g^2) - 210*(e*f - d*g)*(a*e*g^2 + c*f*(2*e*f - d*g))*(f + g*x) + 35*(a*e^2*g
^2 + c*(6*e^2*f^2 - 6*d*e*f*g + d^2*g^2))*(f + g*x)^2 - 42*c*e*(2*e*f - d*g)*(f + g*x)^3 + 15*c*e^2*(f + g*x)^
4))/(105*g^5*Sqrt[f + g*x])

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 215, normalized size = 1.2 \begin{align*} -{\frac{-30\,c{e}^{2}{x}^{4}{g}^{4}-84\,cde{g}^{4}{x}^{3}+48\,c{e}^{2}f{g}^{3}{x}^{3}-70\,a{e}^{2}{g}^{4}{x}^{2}-70\,c{d}^{2}{g}^{4}{x}^{2}+168\,cdef{g}^{3}{x}^{2}-96\,c{e}^{2}{f}^{2}{g}^{2}{x}^{2}-420\,ade{g}^{4}x+280\,a{e}^{2}f{g}^{3}x+280\,c{d}^{2}f{g}^{3}x-672\,cde{f}^{2}{g}^{2}x+384\,c{e}^{2}{f}^{3}gx+210\,a{d}^{2}{g}^{4}-840\,adef{g}^{3}+560\,a{e}^{2}{f}^{2}{g}^{2}+560\,c{d}^{2}{f}^{2}{g}^{2}-1344\,cde{f}^{3}g+768\,c{e}^{2}{f}^{4}}{105\,{g}^{5}}{\frac{1}{\sqrt{gx+f}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(c*x^2+a)/(g*x+f)^(3/2),x)

[Out]

-2/105/(g*x+f)^(1/2)*(-15*c*e^2*g^4*x^4-42*c*d*e*g^4*x^3+24*c*e^2*f*g^3*x^3-35*a*e^2*g^4*x^2-35*c*d^2*g^4*x^2+
84*c*d*e*f*g^3*x^2-48*c*e^2*f^2*g^2*x^2-210*a*d*e*g^4*x+140*a*e^2*f*g^3*x+140*c*d^2*f*g^3*x-336*c*d*e*f^2*g^2*
x+192*c*e^2*f^3*g*x+105*a*d^2*g^4-420*a*d*e*f*g^3+280*a*e^2*f^2*g^2+280*c*d^2*f^2*g^2-672*c*d*e*f^3*g+384*c*e^
2*f^4)/g^5

________________________________________________________________________________________

Maxima [A]  time = 0.995829, size = 277, normalized size = 1.6 \begin{align*} \frac{2 \,{\left (\frac{15 \,{\left (g x + f\right )}^{\frac{7}{2}} c e^{2} - 42 \,{\left (2 \, c e^{2} f - c d e g\right )}{\left (g x + f\right )}^{\frac{5}{2}} + 35 \,{\left (6 \, c e^{2} f^{2} - 6 \, c d e f g +{\left (c d^{2} + a e^{2}\right )} g^{2}\right )}{\left (g x + f\right )}^{\frac{3}{2}} - 210 \,{\left (2 \, c e^{2} f^{3} - 3 \, c d e f^{2} g - a d e g^{3} +{\left (c d^{2} + a e^{2}\right )} f g^{2}\right )} \sqrt{g x + f}}{g^{4}} - \frac{105 \,{\left (c e^{2} f^{4} - 2 \, c d e f^{3} g - 2 \, a d e f g^{3} + a d^{2} g^{4} +{\left (c d^{2} + a e^{2}\right )} f^{2} g^{2}\right )}}{\sqrt{g x + f} g^{4}}\right )}}{105 \, g} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(c*x^2+a)/(g*x+f)^(3/2),x, algorithm="maxima")

[Out]

2/105*((15*(g*x + f)^(7/2)*c*e^2 - 42*(2*c*e^2*f - c*d*e*g)*(g*x + f)^(5/2) + 35*(6*c*e^2*f^2 - 6*c*d*e*f*g +
(c*d^2 + a*e^2)*g^2)*(g*x + f)^(3/2) - 210*(2*c*e^2*f^3 - 3*c*d*e*f^2*g - a*d*e*g^3 + (c*d^2 + a*e^2)*f*g^2)*s
qrt(g*x + f))/g^4 - 105*(c*e^2*f^4 - 2*c*d*e*f^3*g - 2*a*d*e*f*g^3 + a*d^2*g^4 + (c*d^2 + a*e^2)*f^2*g^2)/(sqr
t(g*x + f)*g^4))/g

________________________________________________________________________________________

Fricas [A]  time = 1.7252, size = 466, normalized size = 2.69 \begin{align*} \frac{2 \,{\left (15 \, c e^{2} g^{4} x^{4} - 384 \, c e^{2} f^{4} + 672 \, c d e f^{3} g + 420 \, a d e f g^{3} - 105 \, a d^{2} g^{4} - 280 \,{\left (c d^{2} + a e^{2}\right )} f^{2} g^{2} - 6 \,{\left (4 \, c e^{2} f g^{3} - 7 \, c d e g^{4}\right )} x^{3} +{\left (48 \, c e^{2} f^{2} g^{2} - 84 \, c d e f g^{3} + 35 \,{\left (c d^{2} + a e^{2}\right )} g^{4}\right )} x^{2} - 2 \,{\left (96 \, c e^{2} f^{3} g - 168 \, c d e f^{2} g^{2} - 105 \, a d e g^{4} + 70 \,{\left (c d^{2} + a e^{2}\right )} f g^{3}\right )} x\right )} \sqrt{g x + f}}{105 \,{\left (g^{6} x + f g^{5}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(c*x^2+a)/(g*x+f)^(3/2),x, algorithm="fricas")

[Out]

2/105*(15*c*e^2*g^4*x^4 - 384*c*e^2*f^4 + 672*c*d*e*f^3*g + 420*a*d*e*f*g^3 - 105*a*d^2*g^4 - 280*(c*d^2 + a*e
^2)*f^2*g^2 - 6*(4*c*e^2*f*g^3 - 7*c*d*e*g^4)*x^3 + (48*c*e^2*f^2*g^2 - 84*c*d*e*f*g^3 + 35*(c*d^2 + a*e^2)*g^
4)*x^2 - 2*(96*c*e^2*f^3*g - 168*c*d*e*f^2*g^2 - 105*a*d*e*g^4 + 70*(c*d^2 + a*e^2)*f*g^3)*x)*sqrt(g*x + f)/(g
^6*x + f*g^5)

________________________________________________________________________________________

Sympy [A]  time = 30.8231, size = 204, normalized size = 1.18 \begin{align*} \frac{2 c e^{2} \left (f + g x\right )^{\frac{7}{2}}}{7 g^{5}} + \frac{\left (f + g x\right )^{\frac{5}{2}} \left (4 c d e g - 8 c e^{2} f\right )}{5 g^{5}} + \frac{\left (f + g x\right )^{\frac{3}{2}} \left (2 a e^{2} g^{2} + 2 c d^{2} g^{2} - 12 c d e f g + 12 c e^{2} f^{2}\right )}{3 g^{5}} + \frac{\sqrt{f + g x} \left (4 a d e g^{3} - 4 a e^{2} f g^{2} - 4 c d^{2} f g^{2} + 12 c d e f^{2} g - 8 c e^{2} f^{3}\right )}{g^{5}} - \frac{2 \left (a g^{2} + c f^{2}\right ) \left (d g - e f\right )^{2}}{g^{5} \sqrt{f + g x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(c*x**2+a)/(g*x+f)**(3/2),x)

[Out]

2*c*e**2*(f + g*x)**(7/2)/(7*g**5) + (f + g*x)**(5/2)*(4*c*d*e*g - 8*c*e**2*f)/(5*g**5) + (f + g*x)**(3/2)*(2*
a*e**2*g**2 + 2*c*d**2*g**2 - 12*c*d*e*f*g + 12*c*e**2*f**2)/(3*g**5) + sqrt(f + g*x)*(4*a*d*e*g**3 - 4*a*e**2
*f*g**2 - 4*c*d**2*f*g**2 + 12*c*d*e*f**2*g - 8*c*e**2*f**3)/g**5 - 2*(a*g**2 + c*f**2)*(d*g - e*f)**2/(g**5*s
qrt(f + g*x))

________________________________________________________________________________________

Giac [A]  time = 1.14735, size = 371, normalized size = 2.14 \begin{align*} -\frac{2 \,{\left (c d^{2} f^{2} g^{2} + a d^{2} g^{4} - 2 \, c d f^{3} g e - 2 \, a d f g^{3} e + c f^{4} e^{2} + a f^{2} g^{2} e^{2}\right )}}{\sqrt{g x + f} g^{5}} + \frac{2 \,{\left (35 \,{\left (g x + f\right )}^{\frac{3}{2}} c d^{2} g^{32} - 210 \, \sqrt{g x + f} c d^{2} f g^{32} + 42 \,{\left (g x + f\right )}^{\frac{5}{2}} c d g^{31} e - 210 \,{\left (g x + f\right )}^{\frac{3}{2}} c d f g^{31} e + 630 \, \sqrt{g x + f} c d f^{2} g^{31} e + 210 \, \sqrt{g x + f} a d g^{33} e + 15 \,{\left (g x + f\right )}^{\frac{7}{2}} c g^{30} e^{2} - 84 \,{\left (g x + f\right )}^{\frac{5}{2}} c f g^{30} e^{2} + 210 \,{\left (g x + f\right )}^{\frac{3}{2}} c f^{2} g^{30} e^{2} - 420 \, \sqrt{g x + f} c f^{3} g^{30} e^{2} + 35 \,{\left (g x + f\right )}^{\frac{3}{2}} a g^{32} e^{2} - 210 \, \sqrt{g x + f} a f g^{32} e^{2}\right )}}{105 \, g^{35}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(c*x^2+a)/(g*x+f)^(3/2),x, algorithm="giac")

[Out]

-2*(c*d^2*f^2*g^2 + a*d^2*g^4 - 2*c*d*f^3*g*e - 2*a*d*f*g^3*e + c*f^4*e^2 + a*f^2*g^2*e^2)/(sqrt(g*x + f)*g^5)
 + 2/105*(35*(g*x + f)^(3/2)*c*d^2*g^32 - 210*sqrt(g*x + f)*c*d^2*f*g^32 + 42*(g*x + f)^(5/2)*c*d*g^31*e - 210
*(g*x + f)^(3/2)*c*d*f*g^31*e + 630*sqrt(g*x + f)*c*d*f^2*g^31*e + 210*sqrt(g*x + f)*a*d*g^33*e + 15*(g*x + f)
^(7/2)*c*g^30*e^2 - 84*(g*x + f)^(5/2)*c*f*g^30*e^2 + 210*(g*x + f)^(3/2)*c*f^2*g^30*e^2 - 420*sqrt(g*x + f)*c
*f^3*g^30*e^2 + 35*(g*x + f)^(3/2)*a*g^32*e^2 - 210*sqrt(g*x + f)*a*f*g^32*e^2)/g^35